package demo3;

class Student {
    public void Test() {
        System.out.println("Sudent::Test打印");
    }
}

interface IA{
    void Test1();
}



public class OutClass {
    public void func1(){
        new IA(){
            public void Test1(){
                System.out.println("重写IA");
            }
        }.Test1();
    }

    public void func() {
        new Student() {
            @Override
            public void Test() {
                System.out.println("重写Test");
            }
        }.Test();
    }


}
